import time

from selenium import webdriver
from selenium.webdriver.edge.service import Service

if __name__ == '__main__':
    exe_path = "../driver/msedgedriver.exe"
    service = Service(executable_path=exe_path)
    brower = webdriver.Edge(service=service)

    # 设置窗口最大化显示
    # brower.maximize_window()
    brower.get(url="https://www.baidu.com")

    # 设置窗口最大化
    # brower.maximize_window()
    # 设置窗口最小化
    brower.minimize_window()
    # 睡眠 10 秒
    time.sleep(10)
    # 退出
    brower.quit()
